package com.itheima.springbootcondition1;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class SpringbootCondition1Application {

    public static void main(String[] args) {
        //返回spring容器
        ConfigurableApplicationContext context = SpringApplication.run(SpringbootCondition1Application.class, args);
        //获取redisTemplate这个bean对象
        Object redisTemplate = context.getBean("redisTemplate");
        System.out.println(redisTemplate);
        //自定义bean对象创建
        Object user = context.getBean("user");
        System.out.println(user);
    }

}
